<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表单提交</title>
</head>
<body>
<form action="https://www.baidu.com/s" method="get">
    <input type="text" name="wd" value="百度一下">
    <input type="submit" value="提交" id="submit">
</form>

<script>
    let element = document.getElementById("submit")

    element.onclick = function () {
        console.log("点击了 提交 按钮");
    }
</script>
</body>
</html>